package com.yiban.demo.Station.Entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.*;
import java.math.BigDecimal;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Station {
    @TableId(type = IdType.AUTO)
    private Integer stationId;
    @NotBlank(message = "名称不能为空")
    private String stationName;
    @Max(value = 180,message = "经度范围有误")
    @Min(value = -180,message = "经度范围有误")
    @NotBlank(message = "经度缺失")
    private BigDecimal longitudes;
    @Max(value = 90,message = "纬度范围有误")
    @Min(value = -90,message = "纬度范围有误")
    @NotBlank(message = "纬度缺失")
    private BigDecimal latitudes;

    private Integer userId;

    @Null(message = "无需传入")
    private boolean pass;
}
